using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebControls;
using BusinessLayer;
using EntityLayer;

public partial class Admin_reportSearchLogs : SFPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        this.Validate();
        if (this.HasErrors)
        {
            MessageBoxShow(this.ErrorMessage);
            return;
        }
        sfgSearchLogsMain.LoadGridData();
        sfgSearchLogsDetail.LoadGridData();
    }
    protected bool sfgSearchLogsMain_NeedsDataSource()
    {
        this.Validate();
        if (!this.HasErrors)
        {
            busSearchLogs insBusSearchLogs = new busSearchLogs();
            DataTable insDataTableSearchLogsMain = insBusSearchLogs.ReportSearchLogsMain(calStartDate.Value.Value, calEndDate.Value.Value);
            sfgSearchLogsMain.SetData(insDataTableSearchLogsMain);
        }
        return true;
    }
    protected bool sfgSearchLogsDetail_NeedsDataSource()
    {
        this.Validate();
        if (!this.HasErrors)
        {
            busSearchLogs insBusSearchLogs = new busSearchLogs();
            DataTable insDataTableSearchLogsDetail = insBusSearchLogs.ReportSearchLogsDetail(calStartDate.Value.Value, calEndDate.Value.Value);
            sfgSearchLogsDetail.SetData(insDataTableSearchLogsDetail);
        }
        return true;
    }
}
